<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>个人资料</title>

		<link href="/Public/one/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="/Public/one/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="/Public/one/css/personal.css" rel="stylesheet" type="text/css">
		<link href="/Public/one/css/infstyle.css" rel="stylesheet" type="text/css">
		<!-- 引用控制层插件样式 -->
		<link rel="stylesheet" href="/Public/tools/php_img_upload/control/css/zyUpload.css" type="text/css">
		<script src="/Public/one/AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
		<script src="/Public/one/AmazeUI-2.4.2/assets/js/amazeui.js" type="text/javascript"></script>
			
	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->
					<div class="am-container header">
				<ul class="message-l">
					<div class="topMessage">
						<div class="menu-hd">
							<?php if($_SESSION['uname'] != false ): ?><a href="#" target="_top" class="h">亲，<?php echo ($_SESSION['uname']); ?></a>
								<a href="/Home/Index/out" target="_top">退出</a>

							<?php else: ?>
								<a href="/Home/Login/index" target="_top" class="h">亲，请登录</a>
								<a href="/Home/Register/index" target="_top">免费注册</a><?php endif; ?>
							
						</div>
					</div>
				</ul>
				<ul class="message-r">
					<div class="topMessage home">
						<div class="menu-hd"><a href="/Home/Index/index" target="_top" class="h">商城首页</a></div>
					</div>
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a href="/Home/Information/index" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd" href="/Home/Shopcart/index" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">
						<?php if($count != false): echo ($count); ?>
						<?php else: ?>
						0<?php endif; ?>
						</strong></a></div>
					</div>
					<div class="topMessage favorite">
						<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
				</ul>
			</div>

				<!--悬浮搜索框-->

				<div class="nav white">
					<!-- <div class="logo"><img src="/Public/one/images/logo.png" /></div> -->
					<div class="logoBig">
						<li><img src="/Public/one/images/logobig.png" /></li>
					</div>

					<div class="search-bar pr">
					<a name="index_none_header_sysc" href="#"></a>
					<form action="/Home/Search/index" method="get">
						<input id="searchInput" name="search" type="text" placeholder="搜索" autocomplete="off">
						<input id="ai-topsearch" class="submit am-btn"  value="搜索" index="1" type="submit">
					</form>
				</div>
				</div>

				<div class="clear"></div>
					</div>
				</div>
			</article>
		</header>
            <div class="nav-table">
					   <div class="long-title"><span class="all-goods">全部分类</span></div>
					   <div class="nav-cont">
							<ul>
								<li class="index"><a href="#">首页</a></li>
                                <li class="qc"><a href="#">闪购</a></li>
                                <li class="qc"><a href="#">限时抢</a></li>
                                <li class="qc"><a href="#">团购</a></li>
                                <li class="qc last"><a href="#">大包装</a></li>
							</ul>
						    <div class="nav-extra">
						    	<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
						    	<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
						    </div>
						</div>
			</div>
			<b class="line"></b>
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-info">
						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">个人资料</strong> / <small>Personal&nbsp;information</small></div>
						</div>
						<hr/>

						<!--头像 -->
						<div class="user-infoPic" style="min-height:150px;overflow:hidden">

							<div class="filePic" >
								
								<!-- <input type="file" class="inputPic" allowexts="gif,jpeg,jpg,png,bmp" accept="image/*"> -->
								<?php if($data['image'] == null): ?><img class="am-circle am-img-thumbnail" src="/Public/one/images/getAvatar.do.jpg" alt="" />
								<?php else: ?>
								<img class="am-circle am-img-thumbnail" src="<?php echo ($data['image']); ?>" alt="" /><?php endif; ?>
								<button
								  type="button"
								  class="am-btn am-btn-primary"
								  data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 600, height: 400}">
								  上传头像
								</button>
								
							</div>
							
								
							<p class="am-form-help">头像</p>

							<div class="info-m">
								<div><b>用户名：<i><?php echo ($data['nickname']); ?></i></b></div>
								<div class="u-level">
									<span class="rank r2">
							             <s class="vip1"></s><a class="classes" href="#">铜牌会员</a>
						            </span>
								</div>
								<div class="u-safety">
									<a href="safety.html">
									 账户安全
									<span class="u-profile"><i class="bc_ee0000" style="width: 60px;" width="0">60分</i></span>
									</a>
								</div>
							</div>
						</div>

						<!--个人信息 -->
	<div class="info-main">
		<form class="am-form am-form-horizontal" action="/Home/Information/saveInformation" method="post" enctype="multipart/form-data">
			
			<input type="hidden" name="image" value="<?php echo ($data['image']); ?>">
			<div class="am-form-group">
				<label for="user-name2" class="am-form-label">昵称</label>
				<div class="am-form-content">
					<input type="text" id="user-name2"  name="nickname" placeholder="<?php echo ($data['nickname']); ?>" value="<?php echo ($data['nickname']); ?>">

				</div>
			</div>

			<div class="am-form-group">
				<label for="user-name" class="am-form-label">姓名</label>
				<div class="am-form-content">
					<input type="text" id="user-name2" placeholder="<?php echo ($data['name']); ?>" disabled="disabled">

				</div>
			</div>

			<div class="am-form-group">
				<label class="am-form-label">性别</label>
				<div class="am-form-content sex">
					<label class="am-radio-inline">
						<input type="radio" name="sex" value="男" data-am-ucheck id="man"> 男
					</label>
					<label class="am-radio-inline">
						<input type="radio" name="sex" value="女" data-am-ucheck id="woman"> 女
					</label>
					<label class="am-radio-inline">
						<input type="radio" name="sex" value="保密" data-am-ucheck id="undifine"> 保密
					</label>
				</div>
			</div>

			<div class="am-form-group">
				<label for="user-birth" class="am-form-label">生日</label>
				<div class="am-form-content birth">
					<div class="birth-select">
						<select data-am-selected="{maxHeight: 150}" name="year" value="<?php echo ($data['year']); ?>">
							<?php $__FOR_START_2025836671__=1978;$__FOR_END_2025836671__=2029;for($i=$__FOR_START_2025836671__;$i < $__FOR_END_2025836671__;$i+=1){ ?><option value="<?php echo ($i); ?>"><?php echo ($i); ?></option><?php } ?>
						</select>
						<em>年</em>
					</div>
					<div class="birth-select2">
						<select data-am-selected="{maxHeight: 150}" name="month" value="<?php echo ($data['month']); ?>">
							<?php $__FOR_START_1368379557__=1;$__FOR_END_1368379557__=13;for($i=$__FOR_START_1368379557__;$i < $__FOR_END_1368379557__;$i+=1){ ?><option value="<?php echo ($i); ?>"><?php echo ($i); ?></option><?php } ?>
						</select>
						<em>月</em></div>
					<div class="birth-select2">
						<select data-am-selected="{maxHeight: 150}" name="day" value="<?php echo ($data['day']); ?>">
							<?php $__FOR_START_1520362611__=1;$__FOR_END_1520362611__=32;for($i=$__FOR_START_1520362611__;$i < $__FOR_END_1520362611__;$i+=1){ ?><option value="<?php echo ($i); ?>"><?php echo ($i); ?></option><?php } ?>
						</select>
						<em>日</em></div>
				</div>
		
			</div>
			<div class="am-form-group">
				<label for="user-phone" class="am-form-label">电话</label>
				<div class="am-form-content">
					<input id="user-phone" placeholder="<?php echo ($data['uphone']); ?>" type="tel" name="uphone" value="<?php echo ($data['uphone']); ?>">

				</div>
			</div>
			<div class="am-form-group">
				<label for="user-email" class="am-form-label">电子邮件</label>
				<div class="am-form-content">
					<input id="user-email" placeholder="<?php echo ($data['uemail']); ?>" type="email" name="uemail" value="<?php echo ($data['uemail']); ?>">

				</div>
			</div>

			<div class="am-form-group address">
				<label for="user-address" class="am-form-label">收货地址</label>
				<div class="am-form-content address">
					<a href="address.html">
						<p class="new-mu_l2cw">
							<span class="province">湖北</span>省
							<span class="city">武汉</span>市
							<span class="dist">洪山</span>区
							<span class="street">雄楚大道666号(中南财经政法大学)</span>
							<span class="am-icon-angle-right"></span>
						</p>
					</a>

				</div>
			</div>
			<div class="am-form-group safety">
				<label for="user-safety" class="am-form-label">账号安全</label>
				<div class="am-form-content safety">
					<a href="safety.html">

						<span class="am-icon-angle-right"></span>

					</a>

				</div>
			</div>
			<div class="info-btn">
				<div class="am-btn am-btn-danger"><button type="submit" style="background:#DD514C;border:none">保存修改</button></div>
			</div>

		</form>
	</div>

    </div>

</div>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">恒望科技</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于恒望</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2015-2025 Hengwang.com 版权所有</em>
						</p>
					</div>
				</div>
			</div>

			<!-- 侧边导航 -->
			<aside class="menu">
				<ul>
					<li class="person">
						<a href="#">个人中心</a>
					</li>
					<li class="person">
						<a href="#">个人资料</a>
						<ul>
							<li class="active"> <a href="/Home/Information/index">个人信息</a></li>
							<li> <a href="safety.html">安全设置</a></li>
							<li> <a href="/Home/Address/index">收货地址</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的交易</a>
						<ul>
							<li><a href="/Home/Order/index">订单管理</a></li>
							<li> <a href="change.html">退款售后</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的资产</a>
						<ul>
							<li> <a href="coupon.html">优惠券 </a></li>
							<li> <a href="bonus.html">红包</a></li>
							<li> <a href="bill.html">账单明细</a></li>
						</ul>
					</li>

					<li class="person">
						<a href="#">我的小窝</a>
						<ul>
							<li> <a href="collection.html">收藏</a></li>
							<li> <a href="/Home/Foot/index">足迹</a></li>
							<li> <a href="comment.html">评价</a></li>
							<li> <a href="news.html">消息</a></li>
						</ul>
					</li>

				</ul>

			</aside>
		</div>
		<!-- 模态窗口 -->

			

<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">Modal 标题
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    </div>
    <div class="am-modal-bd">
      <div id="demo" class="demo"></div>   
    </div>
  </div>
</div>


		
		
		<!--图片弹出层样式 必要样式-->
		
		<!-- 引用核心层插件 -->
		<script type="text/javascript" src="/Public/tools/php_img_upload/core/zyFile.js"></script>
		<!-- 引用控制层插件 -->
		<script type="text/javascript" src="/Public/tools/php_img_upload/control/js/zyUpload.js"></script>
		<!-- 引用初始化JS -->
		<script type="text/javascript" >
					$(function(){
				// 初始化插件
				var width = $(window).width();
				if ( width >= 650 )	 width = '100%';
				else 	width = "100%";

				$("#demo").zyUpload({
					width            :   width,                 // 宽度
					height           :   "auto",                 // 宽度
					itemWidth        :   "140px",                 // 文件项的宽度
					itemHeight       :   "100px",                 // 文件项的高度
					//url              :   "/upload/UploadAction",  // 上传文件的路径
					url              :"/Home/Information/up",
					inputName		 : 	'img[]',
					id 				 :	 1,
					multiple         :   true,                    // 是否可以多个文件上传
					dragDrop         :   false,                    // 是否可以拖动上传文件
					del              :   true,                    // 是否可以删除文件
					finishDel        :   false,  				  // 是否在上传文件完成后删除预览
					/* 外部获得的回调接口 */
					onSelect: function(selectFiles, allFiles){    // 选择文件的回调方法  selectFile:当前选中的文件  allFiles:还没上传的全部文件
						console.info("当前选择了以下文件：");
						console.info(selectFiles);
					},
					onProgress: function(file, loaded, total){    // 正在上传的进度的回调方法
						var eleProgress = $("#uploadProgress_" + file.index), percent = (loaded / total * 100).toFixed(2) + '%';
						eleProgress.html(percent);
						console.info(file.index);
						console.info("当前正在上传此文件：");
						console.info(file.name);
						console.info("进度等信息如下：");
						console.info(loaded);
						console.info(total);
					},   
					onDelete: function(file, files){              // 删除一个文件的回调方法 file:当前删除的文件  files:删除之后的文件
						console.info("当前删除了此文件：");
						console.info(file.name);
					},
					onSuccess: function(file, response){          // 文件上传成功的回调方法
							$('.am-img-thumbnail').attr('src',response);
							$('input[name="image"]').val(response);					
							$('#doc-modal-1').modal('close');
						
					},
					onFailure: function(file, response){          // 文件上传失败的回调方法
						$("#uploadImage_" + file.index).css("opacity", 0.2);
						console.info("此文件上传失败：");
						console.info(file.name);
					},
					onComplete: function(response){           	  // 上传完成的回调方法
						console.info("文件上传完成");
						console.info(response);
					}
				});
				
			});




		</script>


		<script type="text/javascript">
		$('input[name="sex"][value="<?php echo ($data["sex"]); ?>"]').attr('checked',true);   //默认选中

		$('select[name="year"]').find('option[value="<?php echo ($data["year"]); ?>"]').prop('selected',true);
		$('select[name="month"]').find('option[value="<?php echo ($data["month"]); ?>"]').prop('selected',true);
		$('select[name="day"]').find('option[value="<?php echo ($data["day"]); ?>"]').prop('selected',true);
		</script>

	</body>

</html>